<template>
  <div class="userTable2">
    <div class="userHead">
      <a class="logo left">
        <img src="../../static/images/logo.png" alt="">
      </a>
      <div class="right">
        <img src="../../static/images/top-1.png" alt="">
        <span class="welcome">您好，XXXXXX  欢迎回来！</span>
        <span class="userCenter">个人中心</span>
        <span class="exit">退出</span>
      </div>
    </div>
    <div class="breadClum">
      <span>
           <a class="bread1">当前位置：首页  >  </a>
      <a class="bread2">流程目录</a>
      </span>
      <router-link :to="{path:'/'}" class="page1">
        <a >有滚动条</a>
      </router-link>
      <router-link :to="{path:'/page2'}" class="page2">
        <a >无滚动条</a>
      </router-link>
    </div>
    <div class="directionNav">
      流程目录
    </div>
    <div class="navList">
      <span class="sp1">添加流程</span>
      <span>批量添加流程</span>
      <span>编辑流程</span>
      <span>合并流程</span>
      <span style="margin-right: 30px">删除流程</span>
      <span class="green">定义基础数据</span>
      <span class="green" style="margin-right: 30px">批量定义基础数据</span>
      <span class="dark" >流程回收站</span>
    </div>
    <el-table  ref="multipleTable"
               :data="tableData3"
               style="width: 100%">
      <el-table-column
        type="selection"
        >
      </el-table-column>
      <el-table-column
        prop="environment"
        label="控制元素"
        >
      </el-table-column>
      <el-table-column
        prop="item"
        label="项目编号"
        >
      </el-table-column>
      <el-table-column label="流程目录" :render-header="renderHeaderOne">

        <el-table-column
          prop="rootOne"
          label="一级流程"
          >
          <template slot-scope="scope">
            <img src="../../static/images/add.png" alt="" v-show=scope.row.rootOne.has>
              {{scope.row.rootOne.name}}
          </template>
        </el-table-column>
        <el-table-column
          prop="rootTwo"
          label="二级流程"
         >
          <template slot-scope="scope2">
            <img src="../../static/images/add.png" alt="" v-if=scope2.row.rootTwo.has>
            {{scope2.row.rootTwo.name}}
          </template>
        </el-table-column>
        <el-table-column
          prop="rootThree"
          label="三级流程"
          >
          <template slot-scope="scope3">
            <img src="../../static/images/add.png" alt="" v-if=scope3.row.rootThree.has>
            {{scope3.row.rootThree.name}}
          </template>
        </el-table-column>
        <el-table-column
          prop="rootFour"
          label="四级流程"
         >
          <template slot-scope="scope4">
            <img src="../../static/images/add.png" alt="" v-if=scope4.row.rootFour.has>
            {{scope4.row.rootFour.name}}
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column
        prop="level"
        label="级别"
        >
      </el-table-column>
      <el-table-column
        prop="num"
        label="控制点数量"
       >
      </el-table-column>
      <el-table-column
        prop="degree"
        label="影响程度"
        >
      </el-table-column>
      <el-table-column
        prop="effect"
        label="控制效果"
        >
      </el-table-column>
      <el-table-column
        prop="company"
        label="集团管控"
        >
        <template slot-scope="scope">
          <!--<el-checkbox-group v-model="scope.row.checkbox">-->
          <el-checkbox v-model="scope.row.keyPoint.checked"></el-checkbox>
          <!--</el-checkbox-group>-->
        </template>
      </el-table-column>
      <el-table-column
        prop="info"
        label="信息化控制"
        >
        <template slot-scope="scope">
          <!--<el-checkbox-group v-model="scope.row.checkbox">-->
          <el-checkbox ></el-checkbox>
          <!--</el-checkbox-group>-->
        </template>

      </el-table-column>
      <el-table-column
        prop="keyPoint"
        label="关键控制"
       >
        <template slot-scope="scope">
          <!--<el-checkbox-group v-model="scope.row.checkbox">-->
          <el-checkbox ></el-checkbox>
          <!--</el-checkbox-group>-->
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      :page-size="100"
      layout="prev, pager, next, jumper"
      :total="1000">
    </el-pagination>
    <div class="fixedBottom">
      <el-button type="default">
        <img src="../../static/images/msg.png" alt="">
      </el-button>
      <!--<a class="msgDialoge">-->
      <!---->
      <!--</a>-->
    </div>
  </div>
</template>
<script>
  export default({
    data (){
      return {
        tableData3: [{
          environment: '内容环境',
          item: 'NA01',
          rootOne: {
              has:true,
              name:'战略规划'
          },
          rootTwo: {
            has:false,
            name:''
          },
          rootThree: {
            has:false,
            name:''
          },
          rootFour:{
            has:false,
            name:''
          },
          level:'1级',
          num:'200',
          degree:'3',
          effect:'4',
          company:"",
          info:"",
          keyPoint:{
            checked:true
          }
        },
          {
            environment: '内容环境',
            item: 'NA01',
            rootOne: {
              has:false,
              name:''
            },
            rootTwo: {
              has:true,
              name:'战略规划'
            },
            rootThree: {
              has:false,
              name:''
            },
            rootFour:{
              has:false,
              name:''
            },
            level:'1级',
            num:'200',
            degree:'3',
            effect:'4',
            company:"",
            info:"",
            keyPoint:{
              checked:true
            }
          },
          {
            environment: '内容环境',
            item: 'NA01-001',
            rootOne: {
              has:false,
              name:''
            },
            rootTwo: {
              has:false,
              name:''
            },
            rootThree: {
              has:false,
              name:''
            },
            rootFour:{
              has:true,
              name:'战略目标'
            },
            level:'1级',
            num:'200',
            degree:'3',
            effect:'4',
            company:"",
            info:"",
            keyPoint:{
              checked:true
            }
          },
          {
            environment: '',
            item: 'NA01-002',
            rootOne: {
              has:false,
              name:''
            },
            rootTwo: {
              has:false,
              name:''
            },
            rootThree: {
              has:true,
              name:'战略目标'
            },
            rootFour:{
              has:false,
              name:''
            },
            level:'1级',
            num:'200',
            degree:'3',
            effect:'4',
            company:"",
            info:"",
            keyPoint:{
              checked:true
            }
          },
          {
            environment: '',
            item: 'NA01',
            rootOne: '',
            rootTwo: '',
            rootThree: '编制基础',
            rootFour:'',
            level:'1级',
            num:'200',
            degree:'3',
            effect:'4',
            company:"",
            info:"",
            keyPoint:{
              checked:true
            }
          },
          {
            environment: '内容环境',
            item: 'NA01',
            rootOne: '',
            rootTwo: '',
            rootThree: '',
            rootFour:'编制基础',
            level:'1级',
            num:'200',
            degree:'3',
            effect:'4',
            company:"",
            info:"",
            keyPoint:{
              checked:true
            }
          },
          {
            environment: '内容环境',
            item: 'NA01',
            rootOne: '组织架构',
            rootTwo: '',
            rootThree: '',
            rootFour:'',
            level:'1级',
            num:'200',
            degree:'3',
            effect:'4',
            company:"",
            info:"",
            keyPoint:{
              checked:true
            }
          }
        ]
      }
    },
    methods:{
      renderHeaderOne (h, { column, $index }) {
        return h('span', [
          h('span', column.label),
          h('span', {
            class: 'errorIcon',
            on: {
              click: () => {
                console.log(`${column.label}   ${$index}`)
              }
            }
          })
        ])
      }
    },
    components:{
//        elTable:'el-table'
    }
  })
</script>
<style >
  .userTable2 .userHead{
    width: 100%;
    height: 60px;
    line-height: 60px;
    background:#8bc34a;
  }
  .userTable2 .logo{
    float: left;
    margin-left: 10px;
    margin-top: 12px;
    width: 520px;
    height: 36px;
  }
  .userTable2 .userHead .right{
    float: right;
    position: relative;
  }
  .userTable2 .userHead .right img{
    margin-top: 3px;
    vertical-align: middle;
    position: absolute;
    right: 315px;

  }
  .userTable2 .userHead .right span{
    display: inline-block;
    font-size: 16px;
    color: white;
    vertical-align: middle;
    line-height: 60px;

  }
  .userTable2 .userHead .right .welcome{
    margin-right: 35px;
  }
  .userTable2 .userHead .right  .userCenter{
    padding-left: 20px;
    position: relative;
    margin-right: 10px;
  }
  .userTable2 .userHead .right  .exit{
    padding-left: 24px;
    position: relative;
    margin-right: 15px;
  }
  .userTable2 .userHead .right  .userCenter:before{
    position: absolute;
    content: "";
    left: 0;
    top:50%;
    margin-top: -8px;
    width:15px;
    height: 16px;
    background-image: url("../../static/images/user.png");
    background-repeat: no-repeat;
    background-position: center;
  }

  .userTable2 .userHead .right  .exit:before{
    position: absolute;
    content: "";
    left: 0;
    top:50%;
    margin-top: -7px;
    width:18px;
    height: 14px;
    background-image: url("../../static/images/exit.png");
    background-repeat: no-repeat;
    background-position: center;
  }
  .userTable2 .breadClum{
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    background:#f1f1f1 ;

  }
  .userTable2 .breadClum span{
    float: left;
    margin-left: 10px;
  }
  .userTable2 .breadClum .bread1{
    color:#888888 ;
  }
  .userTable2 .breadClum .bread2{
    color:#699f2b ;
  }
  .userTable2 .directionNav{
    height: 58px;
    line-height: 58px;
    text-align: center;
    font-size: 22px;
    color: #333333;
  }
  .userTable2 .navList{
    height: 60px;
    border-bottom: 1px solid #eee !important;;
  }
  .userTable2 .navList span{
    display: inline-block;
    padding:10px 20px;
    background: #8bc34a;
    border-radius: 2px;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    font-size: 16px;
    color: white;
    margin-right: 7px;
    margin-top: 10px;

  }
  .userTable2 .navList .sp1{
    margin-left: 10px;
  }
  .userTable2  .navList span.green{
    background: #769dd6 !important;;
  }
  .userTable2 .navList span.dark{
    background: #f0ba14 !important;;
  }
  .userTable2 .el-table td, .el-table th{
    padding: 10px 0;
  }
  .userTable2 .el-table thead.is-group th{
    background: #d3e8ba !important;;
  }
  .userTable2 .el-table thead.is-group th.is-leaf{
    background: #e9f4dc;
    border-bottom: 1px solid #e7e7e7 !important;;
  }

  .userTable2 .el-table th>.cell{
    text-align: center;
    color:#5d9120;
    font-size: 18px;
    font-weight: normal;
  }
  .userTable2 .el-table--border td, .el-table--border th, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed{
    border-right: 1px solid white;
  }
  .userTable2 .el-table .cell{
    text-align: center;
  }
  .userTable2 .el-pager li{
    margin: 0 5px !important;
    background-color: #f4f4f5 !important;;
    color: #888888 !important;;
    min-width: 30px;
    border-radius: 2px;
  }
  .userTable2 .el-pagination{
    text-align: right;
    margin-top: 50px;
  }
  .userTable2 .el-pagination.is-background .el-pager li:not(.disabled).active{
    background: #8bc34a ;
    color: white;
  }
  .userTable2 .el-pager li.active{
    background: #8bc34a !important;;
    color: white !important;;
  }
  .userTable2 .el-pagination button:disabled{
    background: #f4f4f5 !important;;
  }
  .userTable2 .el-table thead .el-checkbox__inner{
    width: 0;
    height: 0;
  }
  .userTable2 .el-checkbox__inner{
    width: 22px !important;
    height: 22px !important;
  }
  .userTable2 .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
    background-color: #8bc34a !important;;
    border-color: #8bc34a !important;;
  }
  .userTable2  .el-checkbox__inner::after{
    left: 6px !important;
    position: absolute;
    top: 2px !important;
    height: 12px !important;
    width: 6px !important;
  }
  /*.cell .el-checkbox  .el-checkbox__inner{*/
  /*width: 18px;*/
  /*height: 18px;*/
  /*}*/
  .userTable2  .fixedBottom{
    position: fixed;
    bottom: 30px;
    right: 10px;

  }
  .userTable2 .fixedBottom a{
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 1px solid #ccc;
    text-align: center;
  }
  .userTable2 .fixedBottom a img{
    width: 36px;
    height: 31px;
  }
  .userTable2 .fixedBottom .el-button{
    padding: 6px 8px;
  }
  .userTable2  tbody,tr:nth-child(even){
    background: #f8f8f8;
  }
  .userTable2 .el-table_1_column_4_column_5 .cell,
  .userTable2  .el-table_1_column_4_column_6   .cell,
  .userTable2  .el-table_1_column_4_column_7   .cell,
  .userTable2  .el-table_1_column_4_column_8   .cell{
    position: relative;
  }
  .userTable2 .el-table_1_column_4_column_5 .cell:before,
  .userTable2 .el-table_1_column_4_column_6 .cell:before,
  .userTable2 .el-table_1_column_4_column_7 .cell:before,
  .userTable2  .el-table_1_column_4_column_8 .cell:before
  {
    /*position: absolute;*/
    /*content: '';*/
    /*left: 28px;*/
    /*top:50%;*/
    /*margin-top:-9px;*/
    /*width: 18px;*/
    /*height: 18px;*/
    /*background-image: url("../../static/images/add.png");*/
  }
  .userTable2 thead  .el-table_1_column_4_column_5 .cell:before,
  .userTable2 thead  .el-table_1_column_4_column_6 .cell:before,
  .userTable2 thead  .el-table_1_column_4_column_7 .cell:before,
  .userTable2  thead  .el-table_1_column_4_column_8 .cell:before{
    width: 0;
    height: 0;
  }
  .userTable2 .el-table .cell img{
   vertical-align: middle;
  }
  .userTable2 .breadClum .page1,.userTable2 .breadClum .page2{
      color: #333;
      text-decoration: none;
      margin-left: 30px;
  }
  .userTable2 .el-table th>.cell span.errorIcon{
    display: inline-block;
    width: 17px;
    height: 15px;
    background-image: url("../../static/images/add2.png");
    margin-left: 5px;
  }
</style>
